f5948d659ea9ff9e643e794f9334601748ccc454,cdap-hbase-compat-0.96/src/main/java/co/cask/cdap/data2/transaction/queue/coprocessor/hbase96/HBaseQueueRegionObserver.java,HBaseQueueRegionObserver,start,#CoprocessorEnvironment#,65

Before Change


    if (env instanceof RegionCoprocessorEnvironment) {
      HTableDescriptor tableDesc = ((RegionCoprocessorEnvironment) env).getRegion().getTableDesc();
      String tableName = tableDesc.getNameAsString();
      String configTableName = QueueUtils.determineQueueConfigTableName(tableName);

      String prefixBytes = tableDesc.getValue(HBaseQueueAdmin.PROPERTY_PREFIX_BYTES);
      try {
        // Default to SALT_BYTES for the older salted queue implementation.
        this.prefixBytes = prefixBytes == null ? HBaseQueueAdmin.SALT_BYTES : Integer.parseInt(prefixBytes);
      } catch (NumberFormatException e) {
        // Shouldn't happen for table created by cdap.
        LOG.error("Unable to parse value of '" + HBaseQueueAdmin.PROPERTY_PREFIX_BYTES + "' property. " +
                    "Default to " + HBaseQueueAdmin.SALT_BYTES, e);
        this.prefixBytes = HBaseQueueAdmin.SALT_BYTES;
      }

      namespaceId = HBaseQueueAdmin.getNamespaceId(tableName);
      appName = HBaseQueueAdmin.getApplicationName(tableName);
      flowName = HBaseQueueAdmin.getFlowName(tableName);

      configCache = ConsumerConfigCache.getInstance(env.getConfiguration(),
                                                    Bytes.toBytes(configTableName));
    }
  }

After Change


      appName = HBaseQueueAdmin.getApplicationName(tableName);
      flowName = HBaseQueueAdmin.getFlowName(tableName);

      conf = env.getConfiguration();
      configTableName = Bytes.toBytes(QueueUtils.determineQueueConfigTableName(tableName));
      configCache = ConsumerConfigCache.getInstance(conf, configTableName);
    }
  }